// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import router from './router'
import 'common/scss/index.scss'
import fastclick from 'fastclick'
import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
import VueLazyload from 'vue-lazyload'
import store from 'store'

/* eslint-disable no-unused-vars */
// import vConsole from 'vconsole'
// console.log('test')

Vue.use(VueLazyload, {
  loading: require('common/image/default.png')
})
Vue.use(VueAwesomeSwiper)
Vue.config.productionTip = false
fastclick.attach(document.body)

// 移动端适配方案
let scale = 1.0 / window.devicePixelRatio
let text = `<meta name="viewport" content="width=device-width, initial-scale=${scale}, maximum-scale=${scale}, minimum-scale=${scale}, user-scalable=no">`
document.write(text)
document.documentElement.style.fontSize = window.innerWidth / 7.5 + 'px'
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
